package net.uhuijia.enums;

public enum UserIdentity {

    Shop("shop","商家");

    private String identity;
    private String name;

    UserIdentity(String identity, String name) {
        this.identity = identity;
        this.name = name;
    }

    public String getIdentity() {
        return identity;
    }

    public void setIdentity(String identity) {
        this.identity = identity;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取用户身份枚举
     * @param identity
     * @return
     */
    public static  UserIdentity getUserIdentityByIdentity(String identity){
        UserIdentity userIdentity = null;
        switch (identity){
            case "business":
                userIdentity  = UserIdentity.Shop;
                break;
        }
        return userIdentity;
    }
}
